package WebGamble;

import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class showImg extends JPanel {
	JLabel jl = null;
	ImageIcon img = null;

	public showImg() {
		img = new ImageIcon("F:\\pcegg\\1.jpg");
		jl = new JLabel(img);
		this.setLayout(new BorderLayout());
		this.add(jl, BorderLayout.CENTER);
	}

	public static void main(String[] args) {
		JFrame test = new JFrame("Image Pane");
		test.getContentPane().add(new showImg());
		test.pack();
		test.setVisible(true);
		
		test.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});
	}
}